package logic

import (
	"context"
	"homepage_srv/internal/dao"

	"homepage_srv/homepage"
	"homepage_srv/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type HotWordSearchLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewHotWordSearchLogic(ctx context.Context, svcCtx *svc.ServiceContext) *HotWordSearchLogic {
	return &HotWordSearchLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *HotWordSearchLogic) HotWordSearch(in *homepage.HotWordSearchRequest) (*homepage.HotWordSearchResponse, error) {
	goods := dao.HotWordSearch(in.HouId)
	return &homepage.HotWordSearchResponse{
		List: goods,
	}, nil
}
